/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package economicocontrol.dao.entity;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author iMac
 */
@Entity
@Table(name = "estatus_entrada_salida")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "EstatusEntradaSalida.findAll", query = "SELECT e FROM EstatusEntradaSalida e"),
    @NamedQuery(name = "EstatusEntradaSalida.findByIdEstatus", query = "SELECT e FROM EstatusEntradaSalida e WHERE e.idEstatus = :idEstatus"),
    @NamedQuery(name = "EstatusEntradaSalida.findByEstadoRegEntSal", query = "SELECT e FROM EstatusEntradaSalida e WHERE e.estadoRegEntSal = :estadoRegEntSal"),
    @NamedQuery(name = "EstatusEntradaSalida.findByDescripcionStatus", query = "SELECT e FROM EstatusEntradaSalida e WHERE e.descripcionStatus = :descripcionStatus"),
    @NamedQuery(name = "EstatusEntradaSalida.idMax", query = "SELECT max(e.idEstatus) FROM EstatusEntradaSalida e ")})
public class EstatusEntradaSalida implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "idEstatus")
    private Integer idEstatus;
    @Column(name = "Estado_RegEntSal")
    private String estadoRegEntSal;
    @Column(name = "Descripcion_Status")
    private String descripcionStatus;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "estatusEntradaSalidaidEstatus")
    private Collection<RegistroEntradaSalida> registroEntradaSalidaCollection;

    public EstatusEntradaSalida() {
    }

    public EstatusEntradaSalida(Integer idEstatus) {
        this.idEstatus = idEstatus;
    }

    public Integer getIdEstatus() {
        return idEstatus;
    }

    public void setIdEstatus(Integer idEstatus) {
        this.idEstatus = idEstatus;
    }

    public String getEstadoRegEntSal() {
        return estadoRegEntSal;
    }

    public void setEstadoRegEntSal(String estadoRegEntSal) {
        this.estadoRegEntSal = estadoRegEntSal;
    }

    public String getDescripcionStatus() {
        return descripcionStatus;
    }

    public void setDescripcionStatus(String descripcionStatus) {
        this.descripcionStatus = descripcionStatus;
    }

    @XmlTransient
    public Collection<RegistroEntradaSalida> getRegistroEntradaSalidaCollection() {
        return registroEntradaSalidaCollection;
    }

    public void setRegistroEntradaSalidaCollection(Collection<RegistroEntradaSalida> registroEntradaSalidaCollection) {
        this.registroEntradaSalidaCollection = registroEntradaSalidaCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idEstatus != null ? idEstatus.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EstatusEntradaSalida)) {
            return false;
        }
        EstatusEntradaSalida other = (EstatusEntradaSalida) object;
        if ((this.idEstatus == null && other.idEstatus != null) || (this.idEstatus != null && !this.idEstatus.equals(other.idEstatus))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "economicocontrol.dao.entity.EstatusEntradaSalida[ idEstatus=" + idEstatus + " ]";
    }
    
}
